// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * NewsletterQueueLink generated by hbm2java
 */
@Entity
@Table(name = "newsletter_queue_link", catalog = "magento")
public class NewsletterQueueLink implements java.io.Serializable {

	private Integer queueLinkId;
	private NewsletterQueue newsletterQueue;
	private NewsletterSubscriber newsletterSubscriber;
	private Date letterSentAt;

	public NewsletterQueueLink() {
	}

	public NewsletterQueueLink(NewsletterQueue newsletterQueue,
			NewsletterSubscriber newsletterSubscriber) {
		this.newsletterQueue = newsletterQueue;
		this.newsletterSubscriber = newsletterSubscriber;
	}

	public NewsletterQueueLink(NewsletterQueue newsletterQueue,
			NewsletterSubscriber newsletterSubscriber, Date letterSentAt) {
		this.newsletterQueue = newsletterQueue;
		this.newsletterSubscriber = newsletterSubscriber;
		this.letterSentAt = letterSentAt;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "queue_link_id", unique = true, nullable = false)
	public Integer getQueueLinkId() {
		return this.queueLinkId;
	}

	public void setQueueLinkId(Integer queueLinkId) {
		this.queueLinkId = queueLinkId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "queue_id", nullable = false)
	public NewsletterQueue getNewsletterQueue() {
		return this.newsletterQueue;
	}

	public void setNewsletterQueue(NewsletterQueue newsletterQueue) {
		this.newsletterQueue = newsletterQueue;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "subscriber_id", nullable = false)
	public NewsletterSubscriber getNewsletterSubscriber() {
		return this.newsletterSubscriber;
	}

	public void setNewsletterSubscriber(
			NewsletterSubscriber newsletterSubscriber) {
		this.newsletterSubscriber = newsletterSubscriber;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "letter_sent_at", length = 19)
	public Date getLetterSentAt() {
		return this.letterSentAt;
	}

	public void setLetterSentAt(Date letterSentAt) {
		this.letterSentAt = letterSentAt;
	}

}
